<?
class indexEngVn extends exportText{
 var $sql;
 var $type;
  function indexEngVn($type){
  $this->type=$type;
 }
  function setsql(){
  $a = func_get_args();
  switch($a[0]){
   case "index":
    $this->sql = "select class_name_$a[1], pageno from class
   			order by class_name_$a[1]";
    break;
  }
 }
  function showResult($lang){
  $this->setsql($this->type,$lang); $t="- see";// echo($this->sql."<br>");
  $result = mysql_query($this->sql) or die('could not query index');
  if($lang=='vn') $t="- xem";
  while($rs=mysql_fetch_array($result,MYSQL_NUM)){
   if(strpos(strtolower($rs[0]),$t)>0){
    $tmp=explode($t,strtolower($rs[0]));
	$str="$tmp[0]".ucfirst($t)."\r\n".trim($tmp[1])."\t\r\n";
	echo($str);
   }else{
    echo("$rs[0]\t$rs[1]\r\n");
   }
  }
 }
}//end class
?>